﻿using System;
using System.Runtime.Serialization;
using System.Xml.Serialization;

namespace Toybox.NicoSharp.Abstracts
{

	/// <summary>
	/// Status の Abstract クラス
	/// </summary>
	[DataContract]
	public abstract class AbstractStatus : EventArgs
	{
		/// <summary>
		/// 取得状態
		/// </summary>
		[XmlAttribute]
		[DataMember]
		public string status;

		/// <summary>
		/// エラー情報
		/// </summary>
		[DataMember]
		public APIError error;

		#region [SubClass]

		/// <summary>
		/// API Error クラス
		/// </summary>
		[DataContract]
		public class APIError
		{
			/// <summary>
			/// エラーコード
			/// </summary>
			[DataMember]
			public string code;

			/// <summary>
			/// エラー説明
			/// </summary>
			[DataMember]
			public string description;
		}

		#endregion [SubClass]

	}
}
